#include <map>
#include <tracetools/packet.hh>

namespace natpt {

  const uint32_t PREFIX_A = 0x0;
  const uint32_t PREFIX_B = 0x0;
  const uint32_t PREFIX_C = 0x0;

  struct CompIP6 {
    bool operator() (const in6_addr x, const in6_addr y)
    {
      bool ret = true;
      for(int i = 0; i < 4; ++i) {
	if(x.s6_addr32[0] < y.s6_addr32[0]) {
	  ret = false;
	  break;
	}
      }
      return ret;
    }
  };

  class AddrMap
  {
    std::map<in6_addr, uint32_t, CompIP6> StoFmap;
    std::map<uint32_t, in6_addr> FtoSmap;
  public:
    inline uint32_t getFaddr(in6_addr a) {return StoFmap.find(a)->second;}
    inline in6_addr getSaddr(uint32_t a) {return FtoSmap.find(a)->second;}
  };

}
